package com.prevpn.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 新增组织架构参数对象
 */
public class GroupCreatDTO {

    @NotBlank(message = "directoryDomain 不能为空")
    private String directoryDomain;

    @NotBlank(message = "组织架构名称不能为空")
    private String name;

    @NotNull(message = "上级组织架构 group 不能为空")
    private GroupParent group;

    private String description;
    private String externalId;

    // 嵌套类
    public static class GroupParent {
        @NotBlank(message = "group.key 不能为空")
        private String key;

        @NotBlank(message = "group.data 不能为空")
        private String data;

        // getters / setters
        public String getKey() { return key; }
        public void setKey(String key) { this.key = key; }
        public String getData() { return data; }
        public void setData(String data) { this.data = data; }
    }

    // getters / setters
    public String getDirectoryDomain() { return directoryDomain; }
    public void setDirectoryDomain(String directoryDomain) { this.directoryDomain = directoryDomain; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public GroupParent getGroup() { return group; }
    public void setGroup(GroupParent group) { this.group = group; }
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    public String getExternalId() { return externalId; }
    public void setExternalId(String externalId) { this.externalId = externalId; }
}
